package com.powerband.testapiandroid

import android.content.Context
import android.content.Intent
import androidx.activity.result.contract.ActivityResultContract

class GetTimeFromAc: ActivityResultContract<Int, List<Int>>() {
    override fun createIntent(context: Context, input: Int): Intent {
        return Intent(context, SubCommandActivity::class.java)
    }

    override fun parseResult(resultCode: Int, intent: Intent?): List<Int> {
        if (resultCode == 10086) {
            return intent?.getIntArrayExtra("SEL")?.asList()?: listOf(0)
        }
        return listOf(0)
    }
}